package com.cinyi.cyds.base.model;

import java.util.HashSet;
import java.util.Set;

import com.cinyi.ormlite.annotation.TConstrains;
import com.cinyi.ormlite.annotation.TField;
import com.cinyi.ormlite.annotation.TSchema;
import com.cinyi.ormlite.annotation.TTable;
import com.cinyi.ormlite.web.model.JdbcBaseModel;

@TTable("tresource")
@TSchema("imoa")
public class Tresource extends JdbcBaseModel<Tresource> {
	@TField(name="id",constrains=@TConstrains(primaryKey=true),length=36)
	private String id;
	
	@TField(name = "name",constrains=@TConstrains(notNull=true) , length=100)
	private String name;
	
	@TField(name = "remark",length=200 )
	private String remark;
	
	@TField(name = "seq",length=50 , type=Integer.class)
	private Integer seq;
	
	@TField(name = "url",length=200 )
	private String url;
	
	@TField(name = "icon",length=200 )
	private String icon;
	
	@TField(name = "tresourcetypeId",length=200 )
	private Integer tresourcetypeId;
	
	@TField(name = "pid",length=200 )
	private String pid;
	
	private String resourceTypeName;
	
	private Set<Trole> troles = new HashSet<Trole>(0);
	private Set<Tresource> tresources = new HashSet<Tresource>(0);

	private Tresourcetype tresourcetype;
	private Tresource tresource;
	
	public Tresource() {
	}

	public Tresource(String id, Tresourcetype tresourcetype, String name) {
		this.id = id;
		this.tresourcetype = tresourcetype;
		this.name = name;
	}

	public Tresource(String id, Tresourcetype tresourcetype, Tresource tresource, String name, String remark, Integer seq, String url, String icon, Set<Trole> troles, Set<Tresource> tresources) {
		this.id = id;
		this.tresourcetype = tresourcetype;
		this.tresource = tresource;
		this.name = name;
		this.remark = remark;
		this.seq = seq;
		this.url = url;
		this.icon = icon;
		this.troles = troles;
		this.tresources = tresources;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Tresourcetype getTresourcetype() {
		return this.tresourcetype;
	}

	public void setTresourcetype(Tresourcetype tresourcetype) {
		this.tresourcetype = tresourcetype;
	}

	public Tresource getTresource() {
		return this.tresource;
	}

	public void setTresource(Tresource tresource) {
		this.tresource = tresource;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getSeq() {
		return this.seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Set<Trole> getTroles() {
		return this.troles;
	}

	public void setTroles(Set<Trole> troles) {
		this.troles = troles;
	}

	public Set<Tresource> getTresources() {
		return this.tresources;
	}

	public void setTresources(Set<Tresource> tresources) {
		this.tresources = tresources;
	}

	public Integer getTresourcetypeId() {
		return tresourcetypeId;
	}

	public void setTresourcetypeId(Integer tresourcetypeId) {
		this.tresourcetypeId = tresourcetypeId;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getResourceTypeName() {
		return resourceTypeName;
	}

	public void setResourceTypeName(String resourceTypeName) {
		this.resourceTypeName = resourceTypeName;
	}

}
